﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasertTemplates.Master" AutoEventWireup="true"
    CodeBehind="Basicinformation.aspx.cs" Inherits="WebApplication.Basicinformation" %>

<%@ Register TagPrefix="uc1" TagName="usermeg" Src="~/UserControl/UserMessageControl.ascx" %>
<%@ Register TagPrefix="uc1" TagName="maintab" Src="~/UserControl/MainTabControl.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css" rel="stylesheet"> 
        .borderstyle_red
        {
            border: 1px solid red;
        }
        .ac_results
        {
            background-color: #ccc;
            padding-bottom: 4px;
            opacity: 0.8;
            -moz-opacity: 0.8;
            -webkit-opacity: 0.8;
            -khtml-opacity: 0.8;
            border: 1px solit #000;
        }
    </style>
    <link href="Media/Css/jquery.lightbox-0.5.css" rel="Stylesheet" />
    <link href="media/js/jquery.uploadify-v2.1.4/uploadify.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="Media/Js/jquery.query.js"></script>
    <script type="text/javascript" src="Media/Js/jquery.lightbox-0.5.js"></script>
    <script type="text/javascript" src="media/js/jquery.uploadify-v2.1.4/swfobject.js"></script>
    <script type="text/javascript" src="media/js/jquery.uploadify-v2.1.4/jquery.uploadify.v2.1.4.min.js"></script>
    <script type="text/javascript" src="xhEditor/xheditor-zh-cn.min.js"></script>
    <script type="text/javascript" src="media/js/jquery-ui-1.8.10.custom.min.js"></script>
    <script type="text/javascript" src="Media/Js/jquery.autocomplete.pack.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#ImgList .p2 a').lightBox();
            $('#ImgList .showbig').each(function () {
                var self = $(this);
                self.click(function () {
                    self.parents("li").find(".p2 img").click();
                });
            });

            //初始化 mediaroom 图片点击事件
            $('#smallImgList .slist li img').click(function () {
                mediaroom_pic_click($(this));
            });

            $('#ContentPlaceHolder2_txtIntro_en').xheditor({ tools: 'full' });
            $('#ContentPlaceHolder2_txtIntro_hk').xheditor({ tools: 'full' });

            //解决ajax请求 富文本编辑器 获不到值问题
            $('#ContentPlaceHolder2_LbtnSave').click(function () {
                $('#ContentPlaceHolder2_hfTxtIntro_hk').val($('#ContentPlaceHolder2_txtIntro_hk').val());
                $('#ContentPlaceHolder2_hfTxtIntro_en').val($('#ContentPlaceHolder2_txtIntro_en').val());
            });

            ///图片上传初始化 开始
            $("#uploadify").uploadify({
                'uploader': 'media/js/jquery.uploadify-v2.1.4/uploadify.swf',
                'script': 'ServerAshxFile/JqueryUploadHandler.ashx',
                'scriptData': { 'mediaType': 'image', 'custuid': '<%=CustUID %>', 'type': 'Customerlogo' },
                'method': 'GET',
                'cancelImg': 'media/js/jquery.uploadify-v2.1.4/cancel.png',
                'folder': 'media/upload/logo',
                'queueID': 'fileQueue',
                'auto': false,
                'multi': false,
                'displayData': 'speed',
                'fileExt': '*.jpg;*.gif;*.png;*.bmp',
                'fileDesc': 'Image Files',
                'sizeLimit': 2512000,
                'onInit': function () { },
                'onSelect': function (e, queueId, fileObj) {
                    $('#id_message').html("您选的文件:" + fileObj.name + "\r\n" + "文件大小:" + fileObj.size + "bytes \r\n");
                },
                'onAllComplete': function (event, data) {
                    $.get("ServerAshxFile/Basicinformation.ashx", { 'type': '2' }, function (data) {
                        $("#smallImgList .imgQu .slist").prepend(data.split('&')[1]);
                        var mediaroomUID = data.split('&')[0];

                        $('#smallImgList .slist li:first').find("img").click(function () {
                            mediaroom_pic_click($(this));
                        });

                        if (mediaroomUID != null) {
                            $.get("ServerAshxFile/Basicinformation.ashx", { 'type': '1', 'mediaroomUID': mediaroomUID }, function (data) {
                                $("#ImgList").prepend(data);

                                var notbind_media = $("#ContentPlaceHolder2_hfnotbind_media").val();
                                notbind_media = notbind_media.toString() + mediaroomUID + ',';
                                $("#ContentPlaceHolder2_hfnotbind_media").val(notbind_media);

                                $("#ImgList li:first").effect("pulsate", { times: 3 }, 400);
                                $("#smallImgList .imgQu .slist li:first").effect("pulsate", { times: 3 }, 400);

                                //--预览窗口重新初始化 开始
                                $('#ImgList .p2 a').lightBox();
                                $('#ImgList .showbig').each(function () {
                                    var self = $(this);
                                    self.click(function () {
                                        self.parents("li").find(".p2 img").click();
                                    });
                                });
                                //--预览窗口重新初始化 结束

                            });
                        }

                        $('#id_message').html("上传成功！");
                    });

                }
            });
            ///图片上传初始化 结束 开始

            ///香港身份证 输入框 事件
            var hkid = $("#ContentPlaceHolder2_txtHKID_PassportNo");
            hkid.val(secretchar($("#ContentPlaceHolder2_hfHKID_PassprotNo").val()));

            hkid.focusin(function () {
                $(this).val('');
            });

            hkid.focusout(function () {
                if ($(this).val().trim().length == 0) {
                    $(this).val(secretchar($("#ContentPlaceHolder2_hfHKID_PassprotNo").val()));
                }
                else {
                    $("#ContentPlaceHolder2_hfHKID_PassprotNo").val($(this).val());
                    $(this).val(secretchar($("#ContentPlaceHolder2_hfHKID_PassprotNo").val()));
                }
            });
            ///香港身份证 输入框 事件 结束

            //自动完成填充 推荐人 开始
            //var custidlist = '';//
           // var websites = custidlist.split('&');
            //$("#ContentPlaceHolder2_txtReferralBy").autocomplete(websites);
            //自动完成填充 推荐人 结束

            //验证字段不能空
            var validate_box = ["ContentPlaceHolder2_txtCustomerSince", "ContentPlaceHolder2_ddlCustomerType", "ContentPlaceHolder2_txtCustomerName_en", "ContentPlaceHolder2_txtCustomerName_hk"];
            $.each(validate_box, function (k, v) {
                var c = $("#" + v);
                c.focusout(function () {
                    validate_null(c);
                });
            });

            //验证非负整数
            $("#ContentPlaceHolder2_txtStroke").focusout(function () {
                validate_num($(this));
            });
            //验证员工数量
            $("#ContentPlaceHolder2_txtNo_ofEmployee").focusout(function () {
                validate_num($(this));
            });
        });

        //输入框部分文字星号
        function secretchar(value) {
            var ret = value;
            if (value.trim() != '' && value.trim().length > 4) {
                var length = value.trim().length;
                var star = "";
                for (i = 0; i < length - 4; i++) {
                    star += "*";
                }
                ret = value.trim().substring(0, 3) + star + value.trim().substring(length - 1);
            }
            return ret;
        }

        function choice_pic() {
            if ($.query.get("cuid") == '') {
                $('#id_message').html("Customer基本信息添加之前，暂时不能上传图片.");
                return;
            }
            $('#uploadify').uploadifyUpload();
            $('#ContentPlaceHolder2_lblMessage').html('');
        }

        function GetOneMediaRoomRelated(mediaroomUID) {
            $('#id_message').html("");

            var notbind_media = $("#ContentPlaceHolder2_hfnotbind_media").val();
            if (notbind_media.toString().indexOf(mediaroomUID) == -1) {
                $.get("ServerAshxFile/Basicinformation.ashx", { 'type': '1', 'mediaroomUID': mediaroomUID },
                        function (data) {
                            $("#ImgList").prepend(data);
                            $("#ImgList li:first").effect("pulsate", { times: 2 }, 400);

                            //--预览窗口重新初始化 开始
                            $('#ImgList .p2 a').lightBox();
                            $('#ImgList .showbig').each(function () {
                                var self = $(this);
                                self.click(function () {
                                    self.parents("li").find(".p2 img").click();
                                });
                            });
                            //--预览窗口重新初始化 结束

                        });

                notbind_media = notbind_media.toString() + mediaroomUID + ',';
                $("#ContentPlaceHolder2_hfnotbind_media").val(notbind_media)
            }
            else {
                $('#id_message').html("不允许重复添加该图片！");
            }
        }

        function delMediaRoomRelated(mediaroomUID) {
            ToggleDocument('ConfirmBox');
            $("#id_confirm_message").html("确定删除吗？");
            $("#id_confire_event").attr("href", "javascript:delMediaRoomRelated_real(" + mediaroomUID + ")");
        }

        function delMediaRoomRelated_real(mediaroomUID) {
            // if (confirm('确定删除吗？') == false) {
            // return;
            //}
            if (mediaroomUID != null) {
                $("#mediaroom_" + mediaroomUID).hide("explode", { pieces: 18 }, 800);
                $("#mediaroom_" + mediaroomUID).remove();
                var notbind_media = $("#ContentPlaceHolder2_hfnotbind_media").val();
                notbind_media = notbind_media.toString().replace(mediaroomUID + ',', '');
                $("#ContentPlaceHolder2_hfnotbind_media").val(notbind_media);
                $('#ContentPlaceHolder2_lblMessage').html('');
            }
            ToggleDocument('ConfirmBox');
        }

        //mediaroom 图片点击事件
        function mediaroom_pic_click(img) {
            if (img != null) {
                img.toggleClass('selectedImg');
                var mediaroomUID = img.attr('alt');
                GetOneMediaRoomRelated(mediaroomUID);
                $('#ContentPlaceHolder2_lblMessage').html('');
            }
        }


        function submitCheck() {
            checkMedio();
            $("#ContentPlaceHolder2_lblMessages").html("");
            $("#validate_null").val("");
            //验证字段不能空
            var ret = true;
            var validate_box = ["ContentPlaceHolder2_txtCustomerSince","ContentPlaceHolder2_ddlCustomerType", "ContentPlaceHolder2_txtCustomerName_en", "ContentPlaceHolder2_txtCustomerName_hk"];
            $.each(validate_box, function (k, v) {
                var c = $("#" + v);
                if (!validate_null(c))
                    ret = false;
            });
            if ($("#validate_null").val() == "false")
                ret = false;
            //验证笔画 （非负整数）
            if (!validate_num($("#ContentPlaceHolder2_txtStroke")))
                ret = false;
            if (!validate_num($("#ContentPlaceHolder2_txtNo_ofEmployee"))) //验证员工数量 非负数
                ret = false;
            return ret;
        }


        ///验证非空的textBox
        function validate_null(c) {
            if (c.val().trim() == "") {
                c.css("border", "1px solid red");
                $("#valid_" + c.attr("id").substring(20, c.attr("id").length)).css("visibility", "visible");

                //$("#valid_" + c.attr("id").substring(20, c.attr("id").length)).val("这个字段不能为空！");
                //alert("#valid_" + c.attr("id").substring(20, c.attr("id").length));
                return false;
            }
            else {
                c.css("border", "");
                $("#valid_" + c.attr("id").substring(20, c.attr("id").length)).css("visibility", "hidden");
                return true;
            }
        }
        //验证非空的textBox 结束

        ///验证非负整数 逻辑
        function validate_num(c) {
            var c_val = c.val().trim();
            if (c_val != "") {
                if (isInteger(c_val)) {
                    c.css("border", "");
                    $("#valid_" + c.attr("id").substring(20, c.attr("id").length)).css("visibility", "hidden");
                    return true;
                }
                else {
                    c.css("border", "1px solid red");
                    $("#valid_" + c.attr("id").substring(20, c.attr("id").length)).css("visibility", "visible");
                    $("#validate_null").val("false");
                    //$("#valid_" + c.attr("id").substring(20, c.attr("id").length)).val("要求整数类型！");
                    return false;
                }
            }
            else {
                c.css("border", "");
                $("#valid_" + c.attr("id").substring(20, c.attr("id").length)).css("visibility", "hidden");
                return true;
            }
        }

        //非负整数 正则表达式验证
        function isInteger(str) {
            var reg = /^[0-9]\d*$/;
            return reg.test(str);
        }

        function checkMedio() {
            var temp = 0;
            var oldStr = $("#ContentPlaceHolder2_Oldhfnotbind_media").val();
            var newStr = $("#ContentPlaceHolder2_hfnotbind_media").val();
            $("#ContentPlaceHolder2_tempVal").attr("value", 0)
            var oldVal = oldStr.substring(0, oldStr.length - 1).split(",");
            var newVal = newStr.substring(0, newStr.length - 1).split(",");
            
            if (oldVal.length != newVal.length) {
                $("#ContentPlaceHolder2_tempVal").attr("value", 1)
            } else {
                for (i = 0; i < oldVal.length; i++) {
                    for (j = 0; j < newVal.length; j++) {
                        if (oldVal[i] == newVal[j]) {
                            temp++;
                            break;
                        }
                    }
                }
                if (temp != oldVal.length) {
                    $("#ContentPlaceHolder2_tempVal").attr("value", 1)
                }
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <input type="hidden" value="t1" id="pageName" /><input id="validate_null" type="hidden" />
    <div class="content-title">
        <h1>
            Customer - Basic Information</h1>
    </div>
    <div class="con-nav">
        <a href="Basicinformation.aspx" class="btn"><span class="ui-icon ui-icon-newwin"></span>
            Add New Customer</a>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true" runat="Server" ID="ScriptManager1" />
    <uc1:usermeg ID="usermeg" runat="server"></uc1:usermeg>
    <div class="partWrap">
        <uc1:maintab ID="maintab" runat="server" />
        <div class="clear20">
        </div>
        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="basiform">
            <tbody>
                <tr>
                    <td width="25%">
                        <p class="upinput">
                            Customer Since<span class="red">*</span></p>
                        <asp:TextBox ID="txtCustomerSince" runat="server" CssClass="input200"></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="ajax_CustomerSince" runat="server" TargetControlID="txtCustomerSince"
                            Format="MMM yyyy" />
                        <br />
                        <span id="valid_txtCustomerSince" style="color: Red; visibility: hidden;font-style:italic;">这个字段不能为空！</span>
                    </td>
                    <td width="25%">
                        <p class="upinput">
                            Customer Type<span class="red">*</span></p>
                        <asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="select200">
                        </asp:DropDownList>
                        <br />
                        <span id="valid_ddlCustomerType" style="color: Red; visibility: hidden;font-style:italic;">这个字段不能为空！</span>
                    </td>
                    <td width="25%">
                        <p class="upinput">
                            Customer ID(<em>Auto Gen)</em></p>
                        <asp:TextBox ID="txtCustomerID" runat="server" CssClass="input200" Enabled="false"></asp:TextBox>
                        <br />
                        <span style="visibility: hidden;">&nbsp;</span>
                    </td>
                    <td width="25%">
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <p class="upinput">
                            Customer Name <span class="red">*</span></p>
                        <asp:TextBox ID="txtCustomerName_en" runat="server" CssClass="input500"></asp:TextBox>
                        <br />
                        <span id="valid_txtCustomerName_en" style="color: Red; visibility: hidden;font-style:italic;">这个字段不能为空！</span>
                    </td>
                    <td colspan="2">
                        <p class="upinput">
                            客戶名稱 <span class="red">*</span></p>
                        <asp:TextBox ID="txtCustomerName_hk" runat="server" CssClass="input500"></asp:TextBox><br />
                        <span id="valid_txtCustomerName_hk" style="color: Red; visibility: hidden;font-style:italic;">这个字段不能为空！</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p class="upinput">
                            Stroke</p>
                        <asp:TextBox ID="txtStroke" runat="server" CssClass="input200"></asp:TextBox><br />
                        <span id="valid_txtStroke" style="color: Red; visibility: hidden;font-style:italic;">要求整数类型！</span>
                    </td>
                    <td>
                        <p class="upinput">
                            Year Established</p>
                        <asp:TextBox ID="txtYearEstablished" runat="server" CssClass="input200"></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtYearEstablished"
                            Format="yyyy" />
                    </td>
                    <td>
                        <p class="upinput">
                            No. of employee</p>
                        <asp:TextBox ID="txtNo_ofEmployee" runat="server" CssClass="input200"></asp:TextBox><br/>
                        <span id="valid_txtNo_ofEmployee" style="color: Red; visibility: hidden;font-style:italic;">要求整数类型！</span>
                    </td>
                    <td>
                        <p class="upinput">
                            BR</p>
                        <asp:TextBox ID="txtBR" runat="server" CssClass="input200"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p class="upinput">
                            HKID / Passport No.</p>
                        <asp:TextBox ID="txtHKID_PassportNo" runat="server" CssClass="input200"></asp:TextBox>
                        <asp:HiddenField ID="hfHKID_PassprotNo" runat="server" />
                    </td>
                    <td>
                        <p class="upinput">
                            Membership Since</p>
                        <asp:TextBox ID="txtMembershipSince" runat="server" CssClass="input200"></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtMembershipSince"
                            Format="MMM yyyy" />
                    </td>
                    <td>
                        <p class="upinput">
                            Membership Referral By</p>
                        <asp:TextBox ID="txtReferralBy" runat="server" CssClass="input200"></asp:TextBox>
                        <ajaxToolkit:AutoCompleteExtender runat="server" BehaviorID="AutoCompleteEx" ID="AutoCompleteExtender1"
                            TargetControlID="txtReferralBy" ServicePath="AutoCompleteProcessor.asmx" ServiceMethod="GetCustmerInfoList"
                            MinimumPrefixLength="2" CompletionInterval="1000" EnableCaching="true" CompletionSetCount="20"
                            CompletionListCssClass="autocomplete_completionListElement" CompletionListItemCssClass="autocomplete_listItem"
                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" DelimiterCharacters=";, :">
                            <Animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteEx');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".4">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteEx')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".4">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteEx')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                            </Animations>
                        </ajaxToolkit:AutoCompleteExtender>


             


                    </td>
                    <td>
                        <p class="upinput">
                            Membership Referral Date</p>
                        <asp:TextBox ID="txtReferralDate" runat="server" CssClass="input200"></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtReferralDate"
                            Format="MMM yyyy" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <p class="upinput">
                            &nbsp;</p>
                        <asp:CheckBox ID="cbGC" runat="server" Text="GC Customer" />
                    </td>
                    <td>
                        <p class="upinput">
                            &nbsp;</p>
                        <asp:CheckBox ID="cbVIP" runat="server" Text="VIP Customer" />
                    </td>
                    <td>
                        <p class="upinput">
                            &nbsp;</p>
                        <asp:CheckBox ID="cbHQLocatedInHK" runat="server" Text="HQ Located in HK" />
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" height="10">
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <p class="upinput">
                            Introduction<em>(1,000.00 character limited)</em>
                        </p>
                        <asp:TextBox ID="txtIntro_en" runat="server" TextMode="MultiLine" CssClass="textarea800_170"></asp:TextBox>
                        <asp:HiddenField ID="hfTxtIntro_en" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3" height="20">
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <p class="upinput">
                            簡介<em>(限制1,000.00個字符)</em></p>
                        <asp:TextBox ID="txtIntro_hk" runat="server" TextMode="MultiLine" CssClass="textarea800_170"></asp:TextBox>
                        <asp:HiddenField ID="hfTxtIntro_hk" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3" height="20">
                        <%--弹出提示框 confirm 开始--%>
                        <div class="msgBoxPS">
                            <div class="SendEmailBox" id="ConfirmBox">
                                <table width="100%" border="0">
                                    <tr>
                                        <td>
                                            <h4>
                                                <img src="Media/Css/images/del-select.png" class="closeBtn" onclick="ToggleDocument('ConfirmBox');"
                                                    alt="" /><strong>确定信息.</strong></h4>
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table id="Table1" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <span id="id_confirm_message" style="color: red; font-weight: bold;"></span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellspacing="0" cellpadding="0" class="btnwrap">
                                    <tr>
                                        <td class="btnwrapl">
                                            <ul class="uibtn">
                                                <li><a id="id_confire_event" href='javascript:ToggleDocument("ConfirmBox")'>Yes</a></li>
                                            </ul>
                                        </td>
                                        <td class="btnwrapr">
                                            <ul class="uibtn">
                                                <li><a href='javascript:ToggleDocument("ConfirmBox")'>No</a></li>
                                            </ul>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <%--弹出提示框 confirm 结束--%>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <div class="addWrap" style="margin-bottom: 10px;">
                            <ul class="uibtn">
                                <li onclick="javascript:ToggleDocument('smallImgList')"><span>Logo / Trademark</span>
                                </li>
                            </ul>
                            <div class="smallImgList" id="smallImgList">
                                <table width="100%">
                                    <tr>
                                        <td>
                                            <img class="closeBtn" alt="" src="Media/Css/images/del-form.png" onclick="CloseDocument('smallImgList')" /><h4>
                                                Choose from Media Room</h4>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="imgQu">
                                                <ul class="slist">
                                                    <asp:Repeater ID="rp_mediaroom" runat="server">
                                                        <ItemTemplate>
                                                            <li>
                                                                <asp:Image ID="imgMedia" runat="server" ImageUrl='<%#JoinPath(Eval("FilePath"),Eval("FileName"),"_50_50",".jpg") %>'
                                                                    AlternateText='<%#Eval("MediaRoomUID") %>' CssClass="" />
                                                            </li>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="35">
                                            <h4>Upload image from your computer </h4>
                                            <div id="fileQueue">
                                            </div>
                                            <br />
                                            <span id="id_message" style="background-color: #ffc; color: Red;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="35">
                                            <table border="0" cellspacing="0" cellpadding="0" class="btnwrap">
                                                <tr>
                                                    <td>
                                                        <input type="file" name="uploadify" id="uploadify" />
                                                    </td>
                                                    <td class="">
                                                        <ul class="uibtn">
                                                            <li><a id="id_choice_pic" onclick="choice_pic()">Upload</a></li>
                                                        </ul>
                                                    </td>
                                                    <%--<td class="btnwrapr">
                                                                </td>--%>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <ul class="ImgList" id="ImgList">
                            <asp:Repeater ID="rpLogo" runat="server">
                                <ItemTemplate>
                                    <li id='<%# "mediaroom_"+Eval("MediaRoomUID") %>'>
                                        <p class="p2">
                                            <a href='<%#JoinPath(Eval("FilePath"),Eval("FileName"),"_600_400",".jpg") %>'>
                                                <img src='<%# JoinPath(Eval("FilePath"),Eval("FileName"),"_100_100",".jpg") %>' alt='' />
                                            </a>
                                        </p>
                                        <div class="p4">
                                            <span class="showbig">View</span> | <span class="closeBtnbig"><a href='javascript:delMediaRoomRelated(<%# Eval("MediaRoomUID") %>)'>
                                                Delete</a></span></div>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
                            <asp:HiddenField ID="hfnotbind_media" runat="server" />
                            <asp:HiddenField ID="Oldhfnotbind_media" runat="server" />
                            <asp:HiddenField ID="tempVal" runat="server" />
                        </ul>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="clear10">
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Always"
            RenderMode="Block">
            <ContentTemplate>
                <table border="0" cellspacing="0" cellpadding="0" class="btnwrap">
                    <tr>
                        <td colspan="3">
                        </td>
                    </tr>
                    <tr>
                        <td class="btnwrapl">
                            <ul class="uibtn">
                                <li>
                                    <asp:LinkButton ID="LbtnSave" runat="server" OnClick="btnSave_Click" ValidationGroup="1"
                                        OnClientClick='return submitCheck();'>Save</asp:LinkButton>
                                </li>
                            </ul>
                        </td>
                        <td class="btnwrapr">
                            <ul class="uibtn">
                                <li>
                                    <asp:LinkButton ID="LbtnQuit" runat="server" CssClass="uibtn">Quit</asp:LinkButton>
                                </li>
                            </ul>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <span style="color: Red;">正向服务器提交信息，请稍等...</span>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                <p>
                    <asp:Label ID="lblMessages" runat="server" Text="" ForeColor="Red"></asp:Label>
                </p>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
